<%@ page language="java" contentType="text/html; charset=utf-8"
    pageEncoding="utf-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>GTD</title>
<jsp:include page="../../../../public/header.jsp"/>
</head>
<body>
	<jsp:include page="../../../../public/nav.jsp"/>
	<div>
		<div class="jumbotron" >
			<p style="text-align: center;">用户中心!</p>
		</div>
	</div>
	<!-- start左边菜单 -->
	<jsp:include page="../../../../public/usersLeft.jsp"></jsp:include>
	<!-- end左边菜单 -->
      <div class="col-xs-9">
      		<ol class="breadcrumb">
			  <li><a href="/users/index.html">用户中心</a></li>
			  <li><a href="#">我的工具</a></li>
			  <li ><a href="${href }">${data.name }</a></li>
			  <li >步骤</li>
			  <li class="active">添加步骤</li>
			</ol>
			<form class="form-horizontal">
  <div class="form-group">
    <label for="name" class="col-sm-2 control-label">项目名字:</label>
    <div class="col-sm-10">
      <input type="text" class="form-control" id="name" placeholder="名字">
    </div>
  </div>
  <div class="form-group">
    <label for="content" class="col-sm-2 control-label">内容:</label>
    <div class="col-sm-10">
     <!--  <input type="text" class="form-control" id="content" placeholder="内容"> -->
     <textarea id="bief" class="form-control" rows="3"></textarea>
    </div>
  </div>
  <div class="form-group">
    <label for="startDate" class="col-sm-2 control-label">开始时间:</label>
    <div class="input-group date form_datetime col-md-5" data-date="" data-date="1979-09-16T05:25:07Z"  data-link-field="startDate" data-link-format="yyyy-mm-dd HH:ii:ss">
       <input class="form-control" size="16" type="text" value="" readonly>
       <span class="input-group-addon"><span class="glyphicon glyphicon-remove"></span></span>
		<span class="input-group-addon"><span class="glyphicon glyphicon-calendar"></span></span>
     </div>
      <input type="hidden" class="form-control" id="startDate" placeholder="开始时间">
  </div>
   <div class="form-group">
    <label for="endDate" class="col-sm-2 control-label">结束时间:</label>
    <div class="input-group date form_datetime col-md-5" data-date="" data-date="1979-09-16T05:25:07Z"  data-link-field="endDate" data-link-format="yyyy-mm-dd HH:ii:ss">
       <input class="form-control" size="16" type="text" value="" readonly>
       <span class="input-group-addon"><span class="glyphicon glyphicon-remove"></span></span>
		<span class="input-group-addon"><span class="glyphicon glyphicon-calendar"></span></span>
     </div>
      <input type="hidden" class="form-control" id="endDate" placeholder="结束时间">
  </div>
  <div class="form-group">
    <div class="col-sm-offset-2 col-sm-10">
      <button id="finish" class="btn btn-default" onclick="return false;">完成</button>
    </div>
  </div>
</form>
      </div>
      <div class="clearfix"></div>
	<jsp:include page="../../../../public/footer2.jsp"/>
</body>
	<script type="text/javascript">
		$(function(){
			$("#finish").click(function(){
				var url = "/users/work/gtd/step/addStep.html";
				var data = {name:$("#name").val(),bief:$("#bief").val(),gid:${data.id},
				startDate:$("#startDate").val(),endDate:$("#endDate").val(),
				};
				var params = {url:url,data,data,type:'post',dataType:'json',error:function(){
					alert("服务器正在维护！");
				},success:function(data){
					if(data.code == 0){
						alert(data.msg);
						window.location.href="/users/work/gtd/step/index.html?id=${data.id}";
					}else{
						alert("服务器正忙！");
					}
				}}
				$.ajax(params);
				return false;
			
			})
			 $('.form_datetime').datetimepicker({
		        //language:  'fr',
		        weekStart: 1,
		        todayBtn:  1,
				autoclose: 1,
				todayHighlight: 1,
				startView: 2,
				forceParse: 0,
		        showMeridian: 1
		    });
			//--------------------------按钮
		})
	</script>
</html>